package com.example.canteen.controller;
import com.example.canteen.domain.InventoryAdjustments;
import com.example.canteen.service.InventoryAdjustmentsService;
import com.example.canteen.service.PaymentsService;
import com.example.canteen.util.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController

@RequestMapping("/Payments")
@Api(tags = "付款记录管理(0304 高凯)")
//@Anonymous
public class PaymentsController {
    @Autowired
    PaymentsService service;
    @GetMapping("/getPaymentsListAll")
    @ApiOperation(value = "获取所有付款记录列表")
    public AjaxResult getPaymentsListAll() {
        System.out.println(service.selectAllPayments());
        return AjaxResult.success(service.selectAllPayments());
    };
    @GetMapping("/getPaymentsById")
    @ApiOperation(value = "根据id查询付款记录信息")
    public AjaxResult getPaymentsById(int id) {
        System.out.println(service.selectPaymentsById(id));
        return AjaxResult.success(service.selectPaymentsById(id));
    }

}
